package com;

import java.net.Socket;

import exceptions.IncorrectConnectionException;

public class ClientHandler implements Runnable {

	private Socket connection = null;
	private String userName = "";
	
	public ClientHandler(Socket client, String user) throws IncorrectConnectionException
	{
		this.setConnection(client);		
		this.userName = user;
	}
	
	@Override
	public void run() {
		
	}
	
	public Socket getConnection()
	{
		return this.connection;
	}
	
	public void setConnection(Socket value)  throws IncorrectConnectionException
	{
		if (value == null)
		{
			throw new IncorrectConnectionException(String.format("aaa"));
		}
	}
	
	public String getUserName()
	{
		return this.userName;
	}

}
